#include "point.h"

Point::Point()
{
    this->x = -1;
    this->y = -1;
}

Point::Point(int x, int y)
{
    this->x = x;
    this->y = y;
}

Point& Point::operator=(const Point &input)
{
    if(this == &input)
    {
        return *this;
    }
    this->x = input.x;
    this->y = input.y;
    return *this;
}

Point Point::operator+(const Point &input)
{
    return Point((this->x + input.x), (this->y + input.y));
}

Point* Point::operator+=(const Point &input)
{

    this->x = this->x + input.x;
    this->y = this->y + input.y;
    return this;
}

int Point::getX()
{
    return this->x;
}

int Point::getY()
{
    return this->y;
}

void Point::setX(int &x)
{
    this->x = x;
}

void Point::setY(int &y)
{
    this->y = y;
}
